package saa.dominio.usuario;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;


@Entity
@NamedQueries({
    @NamedQuery(name = "Administrador.id", query = "SELECT a FROM Administrador a WHERE a.id = :id"),
    @NamedQuery(name = "Administradores", query = "SELECT a FROM Administrador a"),
    @NamedQuery(name = "Administrador.email", query = "SELECT a FROM Administrador a WHERE a.usuario.email = :email")})
public class Administrador implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    @Column(nullable = false)
    @OneToOne
    private Usuario usuario;

    public Administrador() {
        super();
    }
}
